package cn.fingersoft.im.dagger2

import android.app.Application
import com.fingersoft.im.feature.aiassistant.DaggerApplication
import com.iflytek.aiui.demo.chat.di.AppModule
import com.iflytek.aiui.demo.chat.di.ChatActivityModule
import dagger.BindsInstance
import dagger.Component
import dagger.android.AndroidInjectionModule
import javax.inject.Singleton

/**
 * Dagger2 Component入口
 */

@Singleton
@Component(modules = [AndroidInjectionModule::class, AppModule::class, ChatActivityModule::class])
interface AppComponent {
    @Component.Builder
    interface Builder {
        @BindsInstance
        fun application(application: Application): Builder

        fun build(): AppComponent
    }

    fun inject(application: DaggerApplication)

}
